package com.ruoyi.pos.domain.dto.system.request;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * 系统配置更新请求DTO
 * 
 * @author ruoyi
 * @date 2025-01-30
 */
@Data
@ApiModel(description = "系统配置更新请求")
public class SystemConfigUpdateRequest {

    @ApiModelProperty(value = "配置更新列表", required = true)
    @NotNull(message = "配置更新列表不能为空")
    private List<ConfigItem> configItems;

    @ApiModelProperty(value = "更新原因")
    private String updateReason;

    /**
     * 配置项
     */
    @Data
    @ApiModel(description = "配置项")
    public static class ConfigItem {

        @ApiModelProperty(value = "配置ID", required = true)
        @NotNull(message = "配置ID不能为空")
        private Long configId;

        @ApiModelProperty(value = "配置键", required = true)
        @NotBlank(message = "配置键不能为空")
        private String configKey;

        @ApiModelProperty(value = "配置值", required = true)
        @NotBlank(message = "配置值不能为空")
        private String configValue;

        @ApiModelProperty(value = "配置描述")
        private String configDescription;
    }
}
